#!/bin/bash -e

function info() {
echo Usage: `basename $0` 'test train'
exit 2
}

while getopts  ":p:f:" opt; do
	case  $opt  in
		p) out_prefix=$OPTARG;;
		f) suffix=$OPTARG;;
		*) info;;
	esac
done
shift $(($OPTIND - 1))


if [ $# -lt 1 ]; then info; fi

. $var

awk '$2~/^[01]/' $1 > $1.clear

# cat $1.clear |sed '1i\\tbeta\ncancer\tna'> $out_prefix.test.fmt.$1


# test_merge.py -p$out_prefix $1.clear $3

rf_methy.py $2 $1.clear
# rf_methy_011017.py $2 $out_prefix.test.fmt.$1 200 4
# rf_methy_011017.py $2.id_merge $out_prefix.test.pd.$1 200 4

mv $1.clear $1
. $cmd_done